﻿using DA;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BL
{
    public class TheoDoiCongNhanBL
    {
        TheoDoiCongNhanDA theoDoiCongNhanDA;
        

        public TheoDoiCongNhanBL()
        {
            theoDoiCongNhanDA = new TheoDoiCongNhanDA();
        }


        public int themCongNhan(string maCongNhan, string maDonHang, string maSanPham)
        {
            return theoDoiCongNhanDA.themCongNhan(maCongNhan, maDonHang, maSanPham);
        }


        public DataSet layDanhSachTheoDoiCongNhan(string maDonHang)
        {
            return theoDoiCongNhanDA.layDanhSachTheoDoiCongNhan(maDonHang);
        }       

        public DataSet loiCongNhanTheoThang(string thang, string nam)
        {
            return theoDoiCongNhanDA.loiCongNhanTheoThang(thang, nam);
        }

        public DA.BaseConnection.DataPacket layDanhSachTheoDoiCongNhanDungDeInsert()
        {
            return theoDoiCongNhanDA.layDanhSachTheoDoiCongNhanDungDeInsert();
        }

        public DA.BaseConnection.DataPacket layDanhSachTheoDoiCongNhanDeThem()
        {
            return theoDoiCongNhanDA.layDanhSachTheoDoiCongNhanDeThem();
        }

        public bool capNhatDanhSachTheoDoiCongNhan(string maDonHang, string maCongNhan, string maSanPham, string sanLuong, string phePham, string ngayTheoDoi)
        {
            return theoDoiCongNhanDA.capNhatDanhSachTheoDoiCongNhan(maDonHang, maCongNhan, maSanPham, sanLuong, phePham, ngayTheoDoi);
        }

        public DataSet layDanhSachTheoDoiCongNhan(String ngayTheoDoi, String maDonHang)
        {
            return theoDoiCongNhanDA.layDanhSachTheoDoiCongNhan(ngayTheoDoi, maDonHang);
        }

        public DataSet loiCongNhanTheoDonHang(string maDonHang)
        {
            return theoDoiCongNhanDA.loiCongNhanTheoDonHang(maDonHang);
        }
        public int capNhatLoiCongNhan(String maDonHang, String maSanPham, String maCongNhan, String maLoi, Int32 soLoi, String ngaySanXuat, String ngayKiemTra)
        {
            return theoDoiCongNhanDA.capNhatLoiCongNhan(maDonHang, maSanPham, maCongNhan, maLoi, soLoi, ngaySanXuat, ngayKiemTra);
        }
    }
}
